package com.itheima.rpc.protocol;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 每当一个新的请求过来,都会开启一个新的线程,同时调用自己的service方法
 */
public class DispatcherServlet extends HttpServlet {

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        // 该类是真正处理远程调用请求的类
        new HttpServerHandler().handle(req,resp);
    }
}
